<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>军军数学-两位数加减法(多设备兼容版)</title>
		<style type="text/css">
			@media only screen and (min-width: 320px) {
				html{ font-size: 10px!important; line-height: 26px;				
					}
			}
			@media only screen and (min-width: 360px) {
				html{
					font-size: 11.25px!important;line-height: 28px;				}
			}
			@media only screen and (min-width: 400px) {
				html{
					font-size: 12.5px!important; line-height: 30px;				}
			}
			@media only screen and (min-width: 480px) {
				html{
					font-size: 15px!important; line-height: 32px;				}
			}
			@media only screen and (min-width: 640px) {
				html{
					font-size: 20px!important; line-height: 34px;				}
			}
			@media only screen and (min-width: 800px) {
				html{
					font-size: 25px!important;	line-height: 36px;			}
			}	
			
			div,ul,li{margin: 0px; padding: 0px;}
			li{ list-style-type: none;}
			#myTitle{text-align: center; font-weight: bold;}
			#myButtons{text-align: center; }
			#myContent{width:100%; margin: 20px auto 20px auto;}
			#myContent li{ width: 200px; float: left;
			border-color: black; border-style: solid; border-width: 0px 0px 1px 0px;}
			#myContent li img{vertical-align:middle; display: none;}
			#myContent li span{color: red;}
		</style>
		<script type="text/javascript">
			//生成乘法题目
			function Mul()
			{
				document.getElementById("myUl").innerHTML = "";
				var count = 50;  //题目数量
				for(var i = 1;i<= count; i++)
				{
					var a = 99+Math.ceil(Math.random()*900); //三位数
					var b = 9+Math.ceil(Math.random()*90); //二位数
					var newNode = document.createElement("li");
					newNode.id = "li" + i;
					newNode.innerHTML = a + "×" + b;
					document.getElementById("myUl").appendChild(newNode);
				}				
			}
			//生成除法题目
			function Div()
			{
				document.getElementById("myUl").innerHTML = "";
				var count = 50;  //题目数量
				for(var i = 1;i<= count; i++)
				{
					var a = 99+Math.ceil(Math.random()*900); //三位数
					var b = 1 + Math.ceil(Math.random()*8); //一位数
					var newNode = document.createElement("li");
					newNode.id = "li" + i;
					newNode.innerHTML = a + "÷" + b;
					document.getElementById("myUl").appendChild(newNode);
				}				
			}
			
		</script>
	</head>
	<body>
		<div id="myTitle">军军数学-乘法除法生成</div>
		<div id="myButtons">
			<input type="button" value="乘法(3位乘2位)" onclick="Mul();">
			<input type="button" value="除法(3位除1位)" onclick="Div();">
		</div>
		<div id="myContent">
			<ul id="myUl">
			</ul>
		</div>
	</body>
</html>
